const { connectDB, closeDB } = require('../mongoose/database');
const BlogList = require('../data/blogListData');
module.exports = {
  async gets (req, res) {
    try {
      await connectDB();
      const blog = await BlogList.find();
      res.status(200).json(blog);
    } catch (error) {
      res.status(500).json({ message: error.message });
    }
  }

}